document.addEventListener("DOMContentLoaded",function(){var e=FullCalendar.Calendar,t=FullCalendarInteraction.Draggable,n=document.getElementById("external-events"),d=document.getElementById("calendar"),r=document.getElementById("drop-remove");new t(n,{itemSelector:".fc-event",eventData:function(e){return{title:e.innerText}}}),new e(d,{plugins:["interaction","dayGrid","timeGrid"],header:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},editable:!0,droppable:!0,drop:function(e){r.checked&&e.draggedEl.parentNode.removeChild(e.draggedEl)}}).render()});